<template>
    <view :class="theme_view">
        <view v-if="(info || null) != null" :class="(data_base.is_user_add_classinfo || 0) == 1 ? 'page-bottom-fixed' : ''">
            <view class="padding-main bg-white spacing-mb" :style="((info.is_over || null) != null && info.is_over == 1) ? 'background:url('+common_static_url+'mini/over.png) no-repeat right 100px;background-size:200rpx auto;' : ''">
                <view class="spacing-mb"> 
					<view class="classinfo-list-title-box">
						<view class="classinfo-list-goods-name cr-white border-radius-sm fl" :style="'background:'+diytheme.second_color+';'" v-if="info.is_recommended == 1">{{$t('fengcheche.classinfo.tuijian')}}</view>
						<view class="classinfo-list-goods-name cr-white border-radius-sm fl" :style="'background:'+diytheme.second_color+';'" v-if="info.is_top == 1">{{$t('fengcheche.classinfo.zhiding')}}</view>
						<view class="classinfo-list-goods-name cr-white border-radius-xs fl" :style="'background:'+diytheme.main_color+';'">{{ info.goods_name }}</view>
						<view class="text-size">{{ info.title }}</view> 
						<view class="cl"></view>
					</view> 
                    <view class="ftitle-box cr-grey-9 margin-top-lg oh br-t padding-top-main text-size-xs flex-row">
                        <view class="v1">
                            <text>{{ $t('article-detail.article-detail.728374') }}</text>
                            <text>{{ info.add_time }}</text>
                        </view>
                        <view v-if="(data_base || null) != null && data_base.is_info_show_num == 1" class="v2">
                            <text class="margin-left-xxxl">{{ $t('article-detail.article-detail.j92ru0') }}</text>
                            <text>{{ info.access_count }}</text>
                        </view>
						<view v-if="company != null && (company.user_card_id || null) != null && company.user_card_id > 0" class="tel_btn" @tap="url_event" :data-value="'/pages/fcc/classinfo/companycard-detail/companycard-detail?id=' + company.user_card_id">
							<uni-icons type="flag" size="12" color="#ffffff"></uni-icons>
							{{$t('fengcheche.classinfo.seecarditem')}}
						</view>
					</view>
					<view v-if="info.province_name != '' || info.city_name != '' || info.county_name != ''" class="cr-grey-9 oh margin-top-sm text-size-xs">
						<view class="v3">
						    <text v-if="info.province_name != ''">{{ info.province_name }}</text>
							<text class="margin-left-sm" v-if="info.city_name != ''">{{ info.city_name }}</text>
							<text class="margin-left-sm" v-if="info.county_name != ''">{{ info.county_name }}</text>
						</view>
                    </view>
                </view>
                <view class="oh web-html-content spacing-mb">
					<view v-if="(info.goods_info.field_list || null) != null && info.goods_info.field_list.length > 0" class="shuxing-box margin-top-sm margin-bottom">
						<view v-for="(item, index) in info.goods_info.field_list" :key="index" :class="'item '+((item.type == 9 || item.type == 10) ? '' : 'flex-row')">
							<block v-if="((item.type == 9 || item.type == 10) && (item.picurl || null) != null && item.picurl.length > 0) || (item.type != 9 && item.type != 10 && item.default_value != '')">
								<view class="cr-999 item-name">{{item.name}}：</view>
								<view v-if="item.type == 9 || item.type == 10" class="text-tips cr-black yxpicurlbox">
									<block v-if="(item.picurl || null) != null && item.picurl.length > 0">
										<view v-for="(item2, index2) in item.picurl" :key="index2" class="classinfo-images-content">
											<view v-if="item.file_type == 'images'" class="img fl margin-right-sm">
												<image class="radius img" :src="item2.images" :data-value="item2.images" @tap="image_show_event" mode="aspectFill"></image>
											</view>
											<view v-else-if="item.file_type == 'video'" class="img">
												<video class="img" :src="item2.images" :show-center-play-btn="true" :controls="false" :show-play-btn="false" :enable-progress-gesture="false" :show-fullscreen-btn="false"></video>
											</view>
											<view v-else class="yxpicurlbox_file">
												{{item.name}}{{index2}}
											</view>
										</view>
										<view class="cl"></view>
									</block>
								</view>
								<view v-else class="text-tips cr-black"><rich-text :nodes="item.default_value+item.unit"></rich-text></view>
							</block>
						</view>
					</view>
					<view v-if="(info.goods_info.is_show_info_endtime || null) != null && info.goods_info.is_show_info_endtime == 1 && info.infoendtime_old != 0" class="shuxing-box margin-top-sm margin-bottom">
						<view class="item flex-row">
							<view class="cr-999 item-name">有效期至：</view>
							<view class="text-tips cr-black">{{info.infoendtime_date}}</view>
						</view>
					</view>
					<view v-if="(info.over_time_text || null) != null && info.over_time_text != ''" class="shuxing-box margin-top-sm margin-bottom">
						<view class="item flex-row">
							<view class="cr-999 item-name">截止时间：</view>
							<view class="text-tips cr-black">{{info.over_time_text}}</view>
						</view>
					</view>
					<view v-if="(info.label_arr || null) != null && info.label_arr.length > 0" class="label_box margin-top-sm spacing-mb">
						<block v-for="(item2, index2) in info.label_arr" :key="index2">
							<view :class="'fl text-size-xs label-item label-item'+index2">{{item2}}</view>
						</block>
						<view class="cl"></view>
					</view> 
                    <view v-if="(info.video_url || null) != null && ((info.is_live_play || 0) == 0 || client_type == 'weixin')">
                        <video :src="info.video_url" class="wh-auto" :autoplay="false" :controls="true"></video>
                    </view>
					<view v-if="(info.content_arr || null) != null && info.content_arr.length > 0">
						<block v-for="(item, index) in info.content_arr" :key="index">
							<view class="content_arr_item">
								<text class="value">{{item}}</text>
							</view>
						</block>
					</view>
                </view>
				<view v-if="(info.images || null) != null && info.images.length > 0" class="oh classinfo-images-content spacing-mb flex-row flex-wrap">
					<view v-for="(item, index) in info.images" :key="index" class="item margin-right-lg pr">
					    <image :src="item" @tap="upload_show_event" :data-index="index" mode="aspectFill" class="img border-radius-main oh"></image>
					</view>
					<view class="cl"></view>
				</view>
				
				<view class="spacing-mb" v-if="info.goods_info.is_allow_see_tel == 1 && info.is_over == 0">
				    <view v-if="info.contact_name != ''" class="cr-grey-9 margin-top oh padding-top-main text-size-xs">
				        <view class="fl">
				            <text>联系人：</text>
				            <text>{{ info.contact_name }}</text>
				        </view>
				    </view>
					<view v-if="info.contact_tel != ''" class="cr-grey-9 margin-top oh text-size-xs">
					    <view class="fl" @tap="call_event">
					        <text>联系方式：</text>
					        <text class="">点击拨打</text>
					    </view>
					</view>
				</view>
				
                <!-- 评论内容 --> 
				<block v-if="(data_base || null) != null && (data_base.is_classinfo_comments_show_detail || null) != null && parseInt(data_base.is_classinfo_comments_show_detail) == 1">
					<component-info-comments :propData="info" :propDataBase="data_base" :propEmojiList="emoji_list" :propShareInfo="share_info"></component-info-comments>
				</block>
                
				<!--警告信息-->
				<view v-if="info.goods_info.jg_desc != ''" class="jinggao-box radius-md padding-default margin-top margin-bottom">
					<view class="jinggao-cc">{{info.goods_info.jg_desc}}</view>
				</view>
				<!--防诈骗信息-->
				<view v-if="info.goods_info.zp_desc != ''" class="fangzha-box margin-top pr padding-default radius-md">
					<view class="fangzha-title">{{$t('fengcheche.classinfo.jubaotitle')}}</view>
					<view class="fangzha-cc">{{info.goods_info.zp_desc}}</view>
					<view class="fangzha-image pa" @tap="jubao">
						<image :src="common_static_url+'mini/jubao_ico.png'" mode="aspectFill" class="pic"></image>
						<text>{{$t('fengcheche.classinfo.jubaotext')}}</text>
					</view>
				</view>
				<!--关注公众号-->
				<block v-if="(data_base || null) != null && (data_base.mp_article_id || null) != null && data_base.mp_article_id != ''">
					<block v-if="(data_base.mp_article_image || null) != null && data_base.mp_article_image != ''">
						<image :src="data_base.mp_article_image" mode="widthFix" class="mp_article_image margin-top" :data-value="'/pages/article-detail/article-detail?id='+data_base.mp_article_id" @tap="url_event"></image>
					</block>
					<block v-else>
						<view class="mp-article-box margin-top pr padding-default radius-md">
							<view class="mp-article-title tc" :data-value="'/pages/article-detail/article-detail?id='+data_base.mp_article_id" @tap="url_event">关注公众号，获取更多信息</view>
						</view>
					</block>
				</block>
            </view>
			
			<!-- 魔方-导航下方 - 插件 -->
			<block v-if="(plugins_fccprouniapp_mofang || null) != null">
				<component-mofang :propData="plugins_fccprouniapp_mofang" propLocation="23"></component-mofang>
			</block>
			
			<!-- 同城店铺信息 -->
			<view v-if="company != null" class="oh">
				<component-shop-card :propData="company" propFromPage="info_detail"></component-shop-card>
			</view>
			
            <view class="padding-horizontal-main">
                <!-- 上一篇、下一篇 -->
                <view v-if="(last_next || null) != null" class="last-next-data spacing-mt margin-bottom-xxxl cr-grey-9 dis-none">
                    <view v-if="(last_next.last || null) != null" class="flex-row">
                        <text>{{ $t('article-detail.article-detail.281s4a') }}</text>
                        <navigator :url="last_next.last.url" open-type="redirect" hover-class="none" class="dis-inline-block flex-row flex-width single-text">{{ last_next.last.title }}</navigator>
                    </view>
                    <view v-if="(last_next.next || null) != null" class="margin-top flex-row cr-main">
                        <text>{{ $t('article-detail.article-detail.uq5814') }}</text>
                        <navigator :url="last_next.next.url" open-type="redirect" hover-class="none" class="dis-inline-block flex-row flex-width single-text">{{ last_next.next.title }}</navigator>
                    </view>
                </view>
                <!-- 推荐信息 -->
                <view v-if="right_list.length > 0" class="plugins-classinfo-list">
					<component-title :diyTheme="diytheme" propTitleType="1" :propTitle="$t('fengcheche.classinfo.moreinfo')" propMoreUrl="/pages/fcc/classinfo/search/search"></component-title>
					<view class="fccprouniapp_body spacing-mb bg-white-">
						<component-tj-classinfo-list :diyTheme="diytheme" :propData="{...{data: right_list}, ...{random: random_value}}"></component-tj-classinfo-list>
					</view>
                </view>
            </view>
			
			<!-- 底部操作 -->
			<view class="bottom-fixed" :style="bottom_fixed_style">
			    <view class="bottom-line-exclude">
			        <view class="item goods-buy-nav oh round bg-white flex-row jc-sb align-c padding-vertical-sm padding-horizontal-xs">
			            <!-- 左侧集合操作 -->
			            <view class="tc flex-row jc-sa align-c padding-right-sm" :class="((info.goods_info.is_allow_see_tel || null) != null && parseInt(info.goods_info.is_allow_see_tel) == 1 && info.is_over == 0) ? 'flex-width-half' : 'wh-auto'">
			                <!-- 首页 -->
			                <view class="cp pr" data-value="/pages/fcc/classinfo/index/index" @tap="url_event">
			                    <image :src="static_url + 'common/home.png'" mode="scaleToFill" class="image"></image>
			                    <text class="dis-block text-size-xs cr-grey">同城</text>
			                </view>
			                <!-- 发布 -->
			                <view v-if="(data_base || null) != null && data_base.is_user_add_classinfo == 1" class="cp pr" data-value="/pages/fcc/classinfo/category/category" @tap="url_event">
			                    <image :src="static_url + 'common/send.png'" mode="scaleToFill" class="image"></image>
			                    <text class="dis-block text-size-xs cr-grey">发布</text>
			                </view>
							<view v-else class="cp pr" data-value="/pages/user/user" @tap="url_event">
							    <image :src="static_url + 'common/user.png'" mode="scaleToFill" class="image"></image>
							    <text class="dis-block text-size-xs cr-grey">我的</text>
							</view>
			            </view>
			            <!-- 右侧主操作 -->
			            <view v-if="(info.goods_info.is_allow_see_tel || null) != null && parseInt(info.goods_info.is_allow_see_tel) == 1 && info.is_over == 0" :class="'btn-items flex-row jc-sa align-c flex-width-half goods-buy-nav-btn-number-1 fcc-buy-nav-btn-number-1'">
							<button class="btn fl cr-white text-size-md round" :style="'background:'+diytheme.main_color+';'" type="default" @tap="call_event" hover-class="none">拨打电话</button>
			            </view>
			        </view>
			    </view>
			</view>
			
			<!-- 支付弹窗 -->
			<component-payment  
			    :propCurrencySymbol="currency_symbol"
			    :propPayUrl="pay_url"
			    :propQrcodeUrl="qrcode_url"
			    propPayDataKey="ids"
			    :propPaymentList="payment_list"
			    :propTempPayValue="temp_pay_value"
			    :propPayPrice="pay_price"
			    :propPaymentId="payment_id"
			    :propToAppointPage="to_appoint_page"
			    :propIsShowPayment="is_show_payment_popup"
			    @close-payment-popup="payment_popup_event_close"
			></component-payment>

            <!-- 结尾 -->
            <component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
        </view>
        <view v-else>
            <!-- 提示信息 -->
            <component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
        </view>

		<!-- #ifdef APP-PLUS -->
		<yk-authpup ref="authpup" type="top" @changeAuth="changeAuth" :permissionID="permissionID"></yk-authpup>
		<!-- #endif -->
    </view>
</template>
<script>
    const app = getApp();
    import componentNoData from '@/components/no-data/no-data';
    import componentBottomLine from '@/components/bottom-line/bottom-line';
    import componentInfoComments from '../public/info-comments/info-comments';
    import componentGoodsList from '@/components/goods-list/goods-list';
	import componentClassinfoFooter from '../public/footer';
	import componentTitle from '@/components/title/title';
	import componentMofang from "@/components/mofang/mofang";
	import componentTjClassinfoList from '@/components/tj-classinfo-list/tj-classinfo-list';
	import componentShopCard from '../public/shop-card';
	import componentPayment from '@/components/payment/payment';
	import {system_base_info} from "@/common/js/common/common";
	
	// #ifdef APP-PLUS
	import ykAuthpup from "@/components/yk-authpup/yk-authpup";
	// #endif
	
    var common_static_url = app.globalData.get_static_url('classinfo', true);
    export default {
        data() {
            return {
                theme_view: app.globalData.get_theme_value_view(),
                common_static_url: common_static_url,
				static_url: app.globalData.get_static_url('classinfo', true),
                data_list_loding_status: 1,
                data_list_loding_msg: '',
                data_bottom_line_status: false,
                currency_symbol: app.globalData.currency_symbol(),
                client_type: app.globalData.application_client_type(),
                params: null,
                data_base: null,
                info: null,
                right_list: [],
                last_next: null,
                emoji_list: [],
                classinfo_main_name: this.$t('fengcheche.classinfo.bigname'),
				bottom_fixed_style: '',
                // 自定义分享信息
                share_info: {},
				permissionID:'',
				diytheme: null,
				random_value: 0,
				plugins_fccprouniapp_mofang: null,
				company: null,
				
				// 支付弹窗参数
				pay_url: app.globalData.get_request_url('pay', 'index', 'classinfo'),
				qrcode_url: app.globalData.get_request_url('paycheck', 'index', 'classinfo'),
				payment_list: [],
				temp_pay_value: '',
				is_show_payment_popup: false,
				pay_price: 0,
				payment_id: 0,
				// 支付失败跳转的页面
				to_fail_page: '',
				to_appoint_page: '',
            };
        },

        components: {
			// #ifdef APP-PLUS
			ykAuthpup,
			// #endif
            componentNoData,
            componentBottomLine,
            componentInfoComments,
            componentGoodsList,
			componentClassinfoFooter,
			componentTitle,
			componentMofang,
			componentTjClassinfoList,
			componentShopCard,
			componentPayment
        },

        onLoad(params) {
            // 设置参数
            this.setData({
                params: params,
				to_fail_page: '/pages/fcc/classinfo/detail/detail?id='+ params.id,
				to_appoint_page: '/pages/fcc/classinfo/detail/detail?id='+ params.id,
            });
        },

        onShow() {
			// 调用公共事件方法
			app.globalData.page_event_onshow_handle();
			
			// 初始化配置
			this.init();
        },

        // 下拉刷新
        onPullDownRefresh() {
            this.get_data();
        },

        methods: {
			backthispage(data){
				console.log('------->backthispage');
				console.log(data);
				this.init();
			},
			// 加载之前
			init() {
				// 先获取语言基础信息
				system_base_info()
				.then(data=>{
					this.init_before(data)
					.then(()=>{
						this.get_data();
					});
				});
			},
			// 设置本页参数
			init_before(data){
				var self = this;
				return new Promise((resolve, reject) => {
					self.setData({
						lang_info: data.system_lang_info,
						diytheme: data.diytheme,
						currency_symbol: app.globalData.get_config('currency_symbol'),
					});
					resolve();
				});
			},

            // 初始化
            get_data() {
                uni.showLoading({
                    title: this.$t('common.loading_in_text'),
                });
                uni.request({
                    url: app.globalData.get_request_url('detail', 'index', 'classinfo'),
                    method: 'POST',
                    data: {
                        id: this.params.id || 0,
                    },
                    dataType: 'json',
                    success: (res) => {
						console.log(res.data);
                        uni.hideLoading();
                        uni.stopPullDownRefresh();
                        var data = res.data.data;
                        if (res.data.code == 0 && (data.data || null) != null) {
                            var info = data.data || null;
                            var base = data.base || null;
                            this.setData({
								random_value: Math.random(),
                                data_bottom_line_status: true,
                                data_list_loding_status: 3,
                                data_base: base,
                                info: info,
								company: data.company || null,
                                right_list: data.right_list || [],
                                last_next: data.last_next || null,
                                emoji_list: data.emoji_list || [],
                                classinfo_main_name: base == null ? this.classinfo_main_name : (base.classinfo_main_name || this.classinfo_main_name),
								plugins_fccprouniapp_mofang: data.mofang || null,
								payment_list: data.payment_list,
								payment_id: data.default_payment_id || 0,
                            });
							
							// 基础信息存缓存
							uni.setStorageSync('classinfo_base_info_data_key', base);

                            if (info != null) {
                                // 基础自定义分享
                                this.setData({
                                    share_info: {
                                        title: info.goods_name+ (info.seo_title || info.title),
                                        desc: info.seo_desc || info.describe,
                                        path: '/pages/fcc/classinfo/detail/detail',
                                        query: 'id=' + info.id,
                                        img: info.cover,
                                    },
                                });
                                // 标题
                                uni.setNavigationBarTitle({ title: '【'+info.goods_name+'】'+info.title });
                            }
                        } else {
                            this.setData({
                                data_list_loding_status: 0,
                                data_list_loding_msg: res.data.msg,
                            });
                            app.globalData.showToast(res.data.msg);
                        }

                        // 分享菜单处理
                        app.globalData.page_share_handle(this.share_info);
                    },
                    fail: () => {
                        uni.hideLoading();
                        uni.stopPullDownRefresh();
                        this.setData({
                            data_list_loding_status: 2,
                        });
                        app.globalData.showToast(this.$t('common.internet_error_tips'));
                    },
                });
            },
			
			// 客服电话
			call_event() {
				// 是否关闭联系方式查看
				if(parseInt(this.info.goods_info.is_allow_see_tel) == 1 && this.info.contact_tel != '')
				{
					// 如果需要支付才能查看，则提示
					if(parseInt(this.info.goods_info.is_see_phone) == 1)
					{
						// 是否登录，若登录，看是否已支付该信息查看电话
						if(!app.globalData.is_single_page_check()) {
						    return false;
						}
						var user = app.globalData.get_user_info(this, 'call_event');
						if (user != false) {
							uni.showLoading({
							    title: this.$t('common.processing_in_text'),
							});
							uni.request({
							    url: app.globalData.get_request_url('getorderinfo', 'index', 'classinfo'),
							    method: 'POST',
							    data: {
							        "info_id": this.info.id,
									"order_model": 4
							    },
							    dataType: 'json',
							    success: res => {
							        uni.hideLoading();
							        if (res.data.code == 0) {
							            var data = res.data.data || null;
										if((data || null) != null)
										{
											// 有该订单则判断是否支付过
											if(data[0].pay_status == 1)
											{
												if(app.globalData.is_android())
												{
													this.permissionID = 'CALL_PHONE';
													setTimeout(()=>{
														this.$refs['authpup'].open();
													},500);
												}else{
													app.globalData.call_tel(this.info.contact_tel);
												}
											}else{
												app.globalData.showToast(this.$t('fengcheche.classinfo.telpaytips'));
												
												// 未付款，直接弹窗付款
												uni.setStorageSync(app.globalData.data.cache_page_pay_key, {
													order_ids: data[0].id,
												});
												this.setData({
												    is_show_payment_popup: true,
												    pay_price: data[0].total_price,
												    temp_pay_value: data[0].id,
												});
											}
										}else{
											// 为空，先下单再弹窗付款
											this.call_pay_event();
										}
							        } else {
							            if (app.globalData.is_login_check(res.data, this, 'call_event')) {
							                app.globalData.showToast(res.data.msg);
							            }
							        }
							    },
							    fail: () => {
							        uni.hideLoading();
							        app.globalData.showToast(this.$t('common.internet_error_tips'));
							    }
							});
						}
					} else if(parseInt(this.info.goods_info.is_see_phone) == 0){
						// 免费查看
						if(app.globalData.is_android())
						{
							this.permissionID = 'CALL_PHONE';
							setTimeout(()=>{
								this.$refs['authpup'].open();
							},500);
						}else{
							app.globalData.call_tel(this.info.contact_tel);
						}
					}else{
						// 弹窗提示
						app.globalData.alert({
							msg: this.info.goods_info.see_tel_desc || this.$t('fengcheche.classinfo.jubaotips'),
							is_show_cancel: 0,
						});
					}
				}else{
					// 电话不存在，或者禁止查看，已做限制不会出现拨打按钮
					app.globalData.showToast(this.$t('fengcheche.classinfo.teltips'));
				}
            },
			
			// 去下一个拨打电话的付费单
			call_pay_event(){
				app.globalData.showToast(this.$t('fengcheche.classinfo.telpaytips'));
				/*uni.showLoading({
				    title: this.$t('common.processing_in_text'),
				});*/
				uni.request({
				    url: app.globalData.get_request_url('orderadd', 'index', 'classinfo'),
				    method: 'POST',
				    data: {
				        "info_id": this.info.id,
						"order_model": 4,
						"price": this.info.goods_info.see_phone_price || 0,
				    },
				    dataType: 'json',
				    success: res => {
				        //uni.hideLoading();
				        if (res.data.code == 0) {
				            var data = res.data.data || null;
							
							// 弹窗付款
							uni.setStorageSync(app.globalData.data.cache_page_pay_key, {
								order_ids: data.order.id,
							});
							this.setData({
							    is_show_payment_popup: true,
							    pay_price: data.order.total_price,
							    temp_pay_value: data.order.id,
							});
				        } else {
				            app.globalData.showToast(res.data.msg);
				        }
				    },
				    fail: () => {
				        uni.hideLoading();
				        app.globalData.showToast(this.$t('common.internet_error_tips'));
				    }
				});
			},
			
			payment_popup_event_close() {
			    this.setData({
			        is_show_payment_popup: false,
			    });
			},
			
			// 去举报
			jubao(){
				app.globalData.url_open('/pages/fcc/classinfo/report/report?info_id=' + this.info.id);
			},
			
			// url事件
			url_event(e) {
			    app.globalData.url_event(e);
			},
			
			// #ifdef APP-PLUS
			//用户授权权限后的回调
			changeAuth(e){
				// 如果是头像查看的权限返回
				if(this.permissionID == 'WRITE_EXTERNAL_STORAGE')
				{
					// 直接下载
					//app.globalData.save_image_by_url(e);
					app.globalData.image_show_event(e);
				}else{
					app.globalData.call_tel(this.info.contact_tel);
				}
			},
			// #endif
			
			// 图片预览
			upload_show_event(e) {
				if(app.globalData.is_android())
				{
					var self = this;
					uni.previewImage({
					    current: self.info.images[e.currentTarget.dataset.index],
					    urls: self.info.images,
						longPressActions: {
							itemList: [self.$t('fengcheche.fcctips.t9')],
							success: function(data) {
								// 先关闭预览，否则会遮挡上方权限提醒
								uni.closePreviewImage();
								self.permissionID = 'WRITE_EXTERNAL_STORAGE';
								setTimeout(()=>{
									self.$refs['authpup'].open(self.info.images[e.currentTarget.dataset.index]);
								},500);
							},
							fail: function(err) {
								console.log(err.errMsg);
							}
						}
					});
				}else{
					uni.previewImage({
					    current: this.info.images[e.currentTarget.dataset.index],
					    urls: this.info.images,
					});
				}
			},
			// 图片预览2
			image_show_event(e)
			{
				var self = this;
				if(app.globalData.is_android())
				{
					self.permissionID = 'WRITE_EXTERNAL_STORAGE';
					setTimeout(()=>{
						self.$refs['authpup'].open(e);
					},500);
				}else{
					app.globalData.image_show_event(e);
				}
			}
        },
    };
</script>
<style>
	@import './detail.css';
</style>
